package net.brokenroad.gamma.gui;

import java.awt.BorderLayout;
import javax.swing.*;
import java.awt.Dimension;

public class GammaGUIMockup extends JFrame
{

	private static final long serialVersionUID = 1L;
	private JTree fileTree = null;
	private JTextArea console = null;
	private JTextArea textArea1 = null;
	private JTextArea textArea2 = null;
	private JTextArea textArea3 = null;
	private JPanel jContentPane = null;
	private JSplitPane vertSplitPane = null;
	private JSplitPane horizSplitPane = null;
	private JTabbedPane documentEditors = null;
	/**
	 * This is the default constructor
	 */
	public GammaGUIMockup()
	{
		super();
		initialize();
		setVisible(true);
	}
	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize()
	{
		this.setSize(640, 480);
		this.setTitle("JFrame");
		this.add(getJContentPane());
	}
	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane()
	{
		if (jContentPane == null)
		{
			jContentPane = new JPanel();
			jContentPane.setLayout(new BorderLayout());
		}
		jContentPane.add(getVertSplitPane());
		return jContentPane;
	}
	/**
   * This method initializes vertSplitPane	
   * 	
   * @return javax.swing.JSplitPane	
   */
  private JSplitPane getVertSplitPane()
  {
  	if (vertSplitPane == null)
  	{
  		vertSplitPane = new JSplitPane();
  		vertSplitPane.setSize(new Dimension(212, 33));
  	}
  	vertSplitPane.setContinuousLayout(true);
  	vertSplitPane.setOneTouchExpandable(true);
  	vertSplitPane.setLeftComponent(getFileTree());
  	vertSplitPane.setRightComponent(getHorizSplitPane());
  	return vertSplitPane;
  }
  /**
   * This method initializes fileTree	
   * 	
   * @return javax.swing.JTree
   */
  private JTree getFileTree()
  {
  	if(fileTree == null)
  	{
  		fileTree = new JTree();
  	}

  	return fileTree;
  }
  /**
   * This method initializes horizSplitPane	
   * 	
   * @return javax.swing.JSplitPane	
   */
  private JSplitPane getHorizSplitPane()
  {
  	if (horizSplitPane == null)
  	{
  		horizSplitPane = new JSplitPane();
  		horizSplitPane.setSize(new Dimension(212, 33));
  	}
  	horizSplitPane.setContinuousLayout(true);
  	horizSplitPane.setOneTouchExpandable(true);
  	horizSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
  	horizSplitPane.setTopComponent(getDocumentEditors());
  	horizSplitPane.setBottomComponent(getConsole());
  	return horizSplitPane;
  }
  
  private JTabbedPane getDocumentEditors()
  {
  	if(documentEditors == null)
  	{
  		documentEditors = new JTabbedPane();
  	}
  	documentEditors.add("Document #1", getTextArea1());
  	documentEditors.add("Document #2", getTextArea2());
  	documentEditors.add("Document #3", getTextArea3());
  	return documentEditors;
  }
  private JTextArea getTextArea1()
  {
  	if(textArea1 == null)
  	{
  		textArea1 = new JTextArea();
  	}
  	return textArea1;
  }
  private JTextArea getTextArea2()
  {
  	if(textArea2 == null)
  	{
  		textArea2 = new JTextArea();
  	}
  	return textArea2;
  }
  private JTextArea getTextArea3()
  {
  	if(textArea3 == null)
  	{
  		textArea3 = new JTextArea();
  	}
  	return textArea3;
  }  
  private JTextArea getConsole()
  {
  	if(console == null)
  	{
  		console = new JTextArea();
  	}
  	return console;
  }
}
